package main

import(
    "sync"
    "time"
    "fmt"
    "strconv"
)

var Mux sync.Mutex

func main(){
    for i := 0; i < 12; i++{
        go worker(i)
    }
    time.Sleep(14 * time.Second)
}

func worker(i int){
    Mux.Lock()
    time.Sleep(1 * time.Second)
    defer Mux.Unlock()
    fmt.Println("worker : " + strconv.Itoa(i))
}
